package cn.aran.controller;

import cn.aran.domain.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
/**
* @Description: 用户服务：暴露接口给订单访问
* @Author: Aran
* @Version: 1.0
* @Date:  2022/7/28 1:03
*/
@RestController
public class UserController {
    @Value("${server.port}")
    private Long port;

    @GetMapping("/getUserById/{id}")
    public User getUserById(@PathVariable("id") Long id){
        // 通过id查询
        return User.builder().id(id).name("huahua").intro("huahua-test" + port).build();
    }
}
